home *** CD-ROM | disk | FTP | other *** search
- Unit Unit1;
-
- Interface
-
- Uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, Buttons, StdCtrls, Iacs, Iaconn, Iadialgs, Iabuttns;
- Const
- hlp_cntx_Registering = 999;
-
- Type
- TForm1 = class(TForm)
- GroupBox1: TGroupBox;
- IAListBox1: TIAListBox;
- IAEdit1: TIAEdit;
- Label1: TLabel;
- Button1: TButton;
- SaveListBoxItems: TIACheckBox;
- Button2: TButton;
- BitBtn1: TBitBtn;
- GroupBox2: TGroupBox;
- IALabel1: TIALabel;
- IALabel2: TIALabel;
- IAEditCombo1: TIAEditCombo;
- Label2: TLabel;
- IAComboBox1: TIAComboBox;
- IASRButton1: TIASRButton;
- IASRButton2: TIASRButton;
- INISaveItemsChkBx: TIACheckBox;
- KeepHistoryChkBx: TIACheckBox;
- Label3: TLabel;
- BitBtn2: TBitBtn;
- Label4: TLabel;
- IASource1: TIASource;
- Button3: TButton;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure SaveListBoxItemsClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure INISaveItemsChkBxClick(Sender: TObject);
- procedure KeepHistoryChkBxClick(Sender: TObject);
- procedure BitBtn2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- {If the editbox isn't empty then add the text to the IAListbox}
- If IAEdit1.Text <> '' then
- IAListBox1.Items.Add(IAEdit1.Text);
- end;
-
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- {Clear the IAListBox contents}
- IAListBox1.Items.Clear;
- end;
-
- procedure TForm1.SaveListBoxItemsClick(Sender: TObject);
- begin
- {Set the INISaveItems property from the checkbox}
- IAListBox1.INISaveItems:=SaveListBoxItems.Checked;
- end;
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- IASource1.FileName:=ExtractFilePath(Application.ExeName)+IASource1.FileName;
-
- IAComboBox1.KeepHistory:=KeepHistoryChkBx.Checked;
- IAComboBox1.INISaveItems:=INISaveItemsChkBx.Checked;
- IAListBox1.INISaveItems:=SaveListBoxItems.Checked;
-
- {Get the Location of the help file from the INI file
- The directory was put there by Eschalon Setup
- This is so the 'HelpContext' call in the OrderingBtn
- click handler will call the right file}
- With Application Do
- Begin
- HelpFile:=IASource1.ReadString('Location','Help File','');
- If HelpFile <> '' then HelpFile:=HelpFile+'\Iacs.Hlp';
- End;
-
- IASource1.UpdateControls;
- end;
-
- procedure TForm1.INISaveItemsChkBxClick(Sender: TObject);
- begin
- IAComboBox1.INISaveItems := INISaveItemsChkBx.Checked;
- end;
-
- procedure TForm1.KeepHistoryChkBxClick(Sender: TObject);
- begin
- IAComboBox1.KeepHistory := KeepHistoryChkBx.checked;
- end;
-
- procedure TForm1.BitBtn2Click(Sender: TObject);
- begin
- Application.HelpContext( hlp_cntx_Registering );
- end;
-
- procedure TForm1.Button3Click(Sender: TObject);
- begin
- IAComboBox1.Items.Clear;
- end;
-
- procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- IASource1.UpdateFile;
- end;
-
- end.
-